package ema.tpjee.banking.session;

import java.io.Serializable;

import javax.naming.Context;



public class BankingSession implements Serializable{
	

	private static final long serialVersionUID = -5012050375526860760L;
	
	static int instanceCount=0;
	
	
	public void createEjbDao() {
		System.out.println("creating  EjbDao");
		System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
				"org.jnp.interfaces.NamingContextFactory");
		System.setProperty(Context.PROVIDER_URL, "localhost:1099");
		System.setProperty(Context.URL_PKG_PREFIXES,
				"org.jboss.naming:org.jnp.interfaces");
		//etc..
	
	}

	public BankingSession() {
		super();
		System.out.println ("creating session "+instanceCount+1);
		createEjbDao();
		if (instanceCount==0){
		
		}
		instanceCount++;
	}	

	
}
